export const loadingReducer = (state , action) => {
    if (!state){
        return {
            loading:false
        }
    }
    
    switch (action.type) {
        
        case 'change_loading':
            let news={...state}

            news.loading=action.payload
            return news
        default:
            return state
    }
}
